SET QUOTED_IDENTIFIER ON
GO
SET ANSI_NULLS ON
GO
CREATE VIEW dbo.vwtdivisionestemp
AS
SELECT     dbo.tb_Divisionestemp.idDivision AS ID, dbo.tb_Divisionestemp.Mnemo, dbo.tb_Divisionestemp.Descripcion, dbo.tb_Divisionestemp.EsGrupo, 
                      dbo.tb_Divisionestemp.Curso, dbo.tb_Divisionestemp.Division, dbo.tb_Divisionestemp.FechaAlta, dbo.tb_Divisionestemp.Baja, 
                      dbo.tb_Divisionestemp.FechaBaja, dbo.tb_Divisionestemp.CUISE, dbo.tb_GrupoDeCarreras.descripcion AS Grupo_Carreras, 
                      dbo.tb_Turnos.Descripcion AS Turno, dbo.tb_Divisionestemp.EsPrivada, dbo.tb_Divisionestemp.cargo, dbo.tb_Divisionestemp.hora, 
                      dbo.tb_Divisionestemp.divreal
FROM         dbo.tb_Divisionestemp INNER JOIN
                      dbo.tb_Turnos ON dbo.tb_Divisionestemp.Turno = dbo.tb_Turnos.idTurno INNER JOIN
                      dbo.tb_GrupoDeCarreras ON dbo.tb_Divisionestemp.GrupoCarreras = dbo.tb_GrupoDeCarreras.idGrupoCarrera
GO
GRANT SELECT ON  [dbo].[vwtdivisionestemp] TO [Alumnos]
GRANT SELECT ON  [dbo].[vwtdivisionestemp] TO [Direcciones De Nivel]
GRANT SELECT ON  [dbo].[vwtdivisionestemp] TO [SoloVer]
GO
